package com.example.eurekaconsume;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfiguration {
 
    @Autowired
    private SpringClientFactory springClientFactory;
 
    @Bean
    public IRule ribbonRule() {
        return new RoundRobinRule();
    }
 
}